package com.zdd.chap4a.service.impl;

import com.zdd.chap4a.entity.Student;
import com.zdd.chap4a.mapper.StudentMapper;
import com.zdd.chap4a.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    //根据id查找学生
    @Override
    public Student findStudent(int id) {
        return studentMapper.findStudent(id);
    }

    @Override
    public Student findStudentById(int id) {
        return studentMapper.findStudentById(id);
    }

    //修改学生信息
    @Override
    public void updateStudent(Student student) {
        studentMapper.updateStudent(student);
    }
}
